Optimal. Leaf size=387 \[ \frac {2 a (b B-a C) \sin (c+d x) \cos ^2(c+d x)}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-6 a^2 C+5 a b B+b^2 C\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \left (-24 a^3 C+20 a^2 b B+9 a b^2 C-5 b^3 B\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (-48 a^3 C+40 a^2 b B-12 a b^2 C+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-48 a^4 C+40 a^3 b B+24 a^2 b^2 C-25 a b^3 B+9 b^4 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.87, antiderivative size = 387, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3029, 2989, 3049, 3023, 2752, 2663, 2661, 2655, 2653} \[ \frac {2 a (b B-a C) \sin (c+d x) \cos ^2(c+d x)}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-6 a^2 C+5 a b B+b^2 C\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \left (20 a^2 b B-24 a^3 C+9 a b^2 C-5 b^3 B\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (40 a^2 b B-48 a^3 C-12 a b^2 C+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (24 a^2 b^2 C+40 a^3 b B-48 a^4 C-25 a b^3 B+9 b^4 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2989
Rule 3023
Rule 3029
Rule 3049
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx &=\int \frac {\cos ^3(c+d x) (B+C \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \int \frac {\cos (c+d x) \left (-2 a (b B-a C)+\frac {1}{2} b (b B-a C) \cos (c+d x)+\frac {1}{2} \left (5 a b B-6 a^2 C+b^2 C\right ) \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (5 a b B-6 a^2 C+b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {4 \int \frac {\frac {1}{2} a \left (5 a b B-6 a^2 C+b^2 C\right )-\frac {1}{4} b \left (5 a b B-2 a^2 C-3 b^2 C\right ) \cos (c+d x)-\frac {1}{4} \left (20 a^2 b B-5 b^3 B-24 a^3 C+9 a b^2 C\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{5 b^2 \left (a^2-b^2\right )}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-24 a^3 C+9 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a b B-6 a^2 C+b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {8 \int \frac {\frac {1}{8} b \left (10 a^2 b B+5 b^3 B-12 a^3 C-3 a b^2 C\right )+\frac {1}{8} \left (40 a^3 b B-25 a b^3 B-48 a^4 C+24 a^2 b^2 C+9 b^4 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^3 \left (a^2-b^2\right )}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-24 a^3 C+9 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a b B-6 a^2 C+b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}+\frac {\left (40 a^2 b B+5 b^3 B-48 a^3 C-12 a b^2 C\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^4}-\frac {\left (40 a^3 b B-25 a b^3 B-48 a^4 C+24 a^2 b^2 C+9 b^4 C\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^4 \left (a^2-b^2\right )}\\ &=\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-24 a^3 C+9 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a b B-6 a^2 C+b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {\left (\left (40 a^3 b B-25 a b^3 B-48 a^4 C+24 a^2 b^2 C+9 b^4 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^4 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (40 a^2 b B+5 b^3 B-48 a^3 C-12 a b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^4 \sqrt {a+b \cos (c+d x)}}\\ &=-\frac {2 \left (40 a^3 b B-25 a b^3 B-48 a^4 C+24 a^2 b^2 C+9 b^4 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 b B+5 b^3 B-48 a^3 C-12 a b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (b B-a C) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-24 a^3 C+9 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a b B-6 a^2 C+b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.80, size = 304, normalized size = 0.79 \[ \frac {\frac {30 a^3 b (a C-b B) \sin (c+d x)}{b^2-a^2}+\frac {2 b^2 \left (12 a^3 C-10 a^2 b B+3 a b^2 C-5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{(a-b) (a+b)}+\frac {2 \left (48 a^4 C-40 a^3 b B-24 a^2 b^2 C+25 a b^3 B-9 b^4 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{(a-b) (a+b)}+3 b^2 C \sin (2 (c+d x)) (a+b \cos (c+d x))+2 b (5 b B-9 a C) \sin (c+d x) (a+b \cos (c+d x))}{15 b^4 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.88, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \cos \left (d x + c\right )^{4} + B \cos \left (d x + c\right )^{3}\right )} \sqrt {b \cos \left (d x + c\right ) + a}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 8.94, size = 1308, normalized size = 3.38 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________